package com.itzz.spring_zhoneHeng.service;

import com.itzz.spring_zhoneHeng.base.RestResponse;
import com.itzz.spring_zhoneHeng.pojo.Book;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

public interface BookService {
    //查询所有的书籍
    RestResponse queryAllBook(Book book, Integer pageNum, Integer pageSize);

    //根据id回显书籍的信息
    RestResponse queryById(Integer id);

    //修改书籍
    RestResponse updateBook(Book book, MultipartFile files,Integer userId);

    //添加书籍
    RestResponse addBook(Book book, MultipartFile files,Integer classId);

    //删除书籍
    @Transactional
    RestResponse deleteById(Integer id);

    //根据bookid  查询数组 chapids  根据chapids  查询表chapters
    //根据queryChapids
    RestResponse queryChapids(Integer bookid);
}
